// Backend:
public IActionResult OnGetSellProduct(int id)
{
var products = _context.Products;
_context.Products.Find(id).SubtractProduct();
return Page();
}
<!-- FrontEnd: -->
<a asp-page-handler="SellProduct" asp-route-id="@item.ProductId">Sell Product</a>